#include "AM.h"
#include "../PreambleCtp.h"

configuration SnifferC {

}
implementation {
  components SnifferP, MainC, LedsC;
  components TimeSyncMessageC as ActiveMessageC;
  components HilTimerMilliC;

  components SerialActiveMessageC;
  components new SerialAMSenderC(AM_DATA_MSG);
  components new QueueC(message_t*, 12);
  components new PoolC(message_t, 12);

  SnifferP.Boot -> MainC;
  SnifferP.RadioControl -> ActiveMessageC;

  SnifferP.Packet -> ActiveMessageC;
  SnifferP.RadioPacket -> ActiveMessageC.Packet;
  SnifferP.Leds -> LedsC;

  SnifferP.SerialControl -> SerialActiveMessageC;
  SnifferP.UARTSend -> SerialAMSenderC.AMSend;
  SnifferP.Queue -> QueueC;
  SnifferP.Pool -> PoolC;

  SnifferP.LocalTime -> HilTimerMilliC;
  SnifferP.SnifferReceive -> ActiveMessageC.Receive[AM_SNIFFER_MSG];
}
